package course8.com.youkeda.service;

import course8.com.youkeda.model.Classes;

import java.util.List;

public interface ClassesService {
    //添加班级
     void add(Classes classes);
    //获取班级记录
    List<Classes> getAll();
    //获取班级数据
    default Classes get(String classid){
        List<Classes> classes=getAll();
        for (Classes classs:classes
             ) {
            if (classs.getId().equals(classid)){
                return classs;
            }
        }
        return null;
    };


}
